import Vue from 'vue'
import Router from 'vue-router'
import Login from "../views/user/Login";
import signUp from "../views/user/signUp.vue";
import Main from "../views/Main";
import UserList from "../views/userList/userList.vue";
import wrongPage from "../views/404"
import psychology from "../views/System/psychology.vue";
import NewsList from "../views/System/NewsList.vue";
import QuestionnairesList from "../views/System/QuestionnairesList.vue";

Vue.use(Router)

export default new Router({
    mode: "history",
    routes: [
        {
            path: '/',
            // path: "/login",
            name: 'login',
            component: Login
        },
        {
            path: '/signUp.vue',
            name: 'signUp',
            component: signUp
        }, {
            path: '/main/:user_name',
            // path: "/:username",
            name: 'main',
            component: Main,
            props: true,
            children: [
                {
                    path: '/userList',
                    name: 'userList',
                    component: UserList
                },
                {
                    path: '/psychology',
                    name: 'psychology',
                    component: psychology
                },
                {
                    path: '/QuestionnairesList',
                    name: 'QuestionnairesList',
                    component: QuestionnairesList
                },
                {
                    path: '/NewsList',
                    name: 'NewsList',
                    component: NewsList
                }
            ]
        },
        {
            path: '*',
            name: 'wrongPage',
            component: wrongPage
        }
    ]
})
